<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>GameLoop</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="underscore.js"></script>
    <script src="quintus.js"></script>
</head>
<body>
<div id="timer">0</div>
<div id="fps">0</div>
<button id="pause">暂停</button>
<button id="unpause">开始</button>
<script>
    var TimerTest = Quintus()
    var totalFrames = 0,
        totalTimer = 0;

    TimerTest.gameLoop(function (dt) {
        totalTimer += dt
        totalFrames += 1
        $('#timer').text(totalTimer/1000+'MS')
        $('#fps').text(totalFrames+'FPS')
    })

    $('#pause').on('click',TimerTest.pauseGame)
    $('#unpause').on('click',TimerTest.unpauseGame)
</script>
</body>
</html>
